define(function(require) {
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
	var CommonUtils = require("$UI/system/components/justep/common/utils");

	var Model = function() {
		this.callParent();
	};
	
	Model.prototype.toUrl = function(url) {
		return require.toUrl(url);
	};	
	
	Model.prototype.open = function(url) {
		if (this.getStatus() === 5) {
			this.comp('windowDialog1').open({src:require.toUrl(url)});
		}
	};
	
	Model.prototype.modelLoad = function(){
	var a = this.comp('windowReceiver1');
		if (justep.Browser.isX5App) {
			CommonUtils.attachDoubleClickExitApp(function(){
				a.windowCancel();
			});
		}
	}
	Model.prototype.test = function(){
		alert("test");
	}
				
	Model.prototype.backBtnClick = function(){
		this.comp('windowReceiver1').windowCancel();
	};
	
	
		
	return Model;
});

